The <span> tag in HTML is a general box for short parts and content that can be used at the same time. It's used to group things for looking good (by using the class or id features). A better way when no other meaning is around.
The <span> tag is a paired tag. That means it has both open and closing tags, like <span></span>. You must close the tag correctly every time you use it. The span tag is for collecting small parts of text, but it doesn't change how things look on its own.
The <span> tag is a small box for text and documents, used to highlight important parts.
You can change how the <span> tag looks using CSS or move it around with JavaScript. Just use its class or id to do so.
The <span> tag is like the <div> part, but <div>is on a bigger level and <span>is smaller.
HTML Example
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset ="UTF-8"> <!--This is our webpage it's our very first webpage title-->
<title>Levoric | HTML Fundamentle Tutorial</title>
</head>
<body> <!--This is our web content it's our very first web content inside of body tag-->
<h1class="heading-1">What is Span Tag ?</h1>
<!--This is our webpage it's our very first webpage paragraph--> <spanclass="span-text-1">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta exercitationem voluptates ipsum temporibus! Distinctio reiciendis ab error vero corrupti officia quia. Perferendis quibusdam, ut eius repellendus officiis doloremque consequatur eveniet!
</body>
</html>
output
What is <span> Tag ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta exercitationem voluptates ipsum temporibus! Distinctio reiciendis ab error vero corrupti officia quia. Perferendis quibusdam, ut eius repellendus officiis doloremque consequatur eveniet!